home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / think / AmigaGnuChess.lha / chess / src.lha / src / makefile < prev    next >
Makefile  |  1992-09-06  |  8KB  |  236 lines

  1. #
  2. # Makefile for GNU Chess
  3. #
  4.  
  5. #
  6. # gnuchessa is Amiga curses
  7. # gnuchess  is a curses-based chess.
  8. # gnuchessn is a fancy-display-curses-based chess.
  9. # gnuchessr is a plain dumb-terminal chess (but with full variation output)
  10. # gnuchessc is suitable for chesstool use (mimics /usr/games/chess output)
  11. # gnuchessx is the xchess based chess.
  12. #
  13.  
  14. # The version number of this GNU and Xboard release
  15. VERS=    4.0
  16. XVERS = 2.0
  17.  
  18. # Relevant file areas.
  19. DIST=    ../README ../README.lang ../doc ../misc ../src ../test
  20.  
  21. # Distribution directory
  22. DISTDIR=gnlib:
  23.  
  24. # Programs being distributed
  25. #PROGS=gnuchess-$(VERS) xboard-$(XVERS)
  26. PROGS=gnuchess-$(VERS)
  27.  
  28. # Change these to something less transitory, like /usr/games, and then
  29. # compile. Ask your system admin / unix guru to put gnuchess.{hash,lang,book}
  30. # in $(LIBDIR).
  31. # Where the binaries live.
  32. BINDIR=
  33.  
  34. # Where language description, our book, and the persistent hash live.
  35. LIBDIR= gnuchess:
  36.  
  37. # Display routines.
  38. #LCURSES=-lcurses -ltermcap
  39. LCURSES=-ltermcap
  40.  
  41. #compile options for gnuchess
  42. # -DAG[0-4]  selects a set of values for SpaceBonus tables
  43. # -DQUIETBACKGROUND don't print post information in background ( easy OFF)
  44. # -DNOMEMSET if your machine does not support memset
  45. # -DNOMATERIAL don't call it a draw when no pawns and both sides < rook
  46. # -DNODYNALPHA don't dynamically adjust alpha
  47. # -DHISTORY use history killer hueristic 
  48. # -DKILLT use killt killer hueristic 
  49. # -DNOSCORESPACE don't use Scorespace heuristic
  50. # -DOLDXBOARD don't generate underpromote moves
  51. # -DGNU3 don't generate underpromote moves
  52. # -DLONG64 if you have 64bit longs
  53. # -DSYSV   if you are using SYSV
  54. # some debug options
  55. # -DDEBUG8 dump board,movelist,input move to /tmp/DEBUG if illegal move
  56. # -DDEBUG9 dump move list from test command
  57. # -DDEBUG10 dump board and move after search before !easy begins
  58. # -DDEBUG11 dump board when the move is output
  59. # -DDEBUG12 dump boards between moves
  60. # -DDEBUG13 dump search control information for each move to /tmp/DEBUG
  61. # -DDEBUG40 include extra values of variables for debugging  in game list
  62. # the rest of the debug options are tied to the debuglevel command
  63. # -DDEBUG -DDEBUG4 set up code for debuglevel command
  64. #          debuglevel
  65. #               1 always force evaluation in evaluate
  66. #               4 print move list after search
  67. #               8 print move list after book before search
  68. #              16 print move list after each ply of search
  69. #              32 print adds to transposition table
  70. #              64 print returns from transposition table lookups
  71. #          256 print search tree as it is generated
  72. # Added by MWS:
  73. # -DALWAYSLIST    always list game on exit
  74. # -DRANDOMIZE    random-mode (dither) always set for new game
  75. # -DCOORDSOFF    if board coords are initially off
  76.  
  77. OPT=-v -dAG4 -dRANDOMIZE -d0
  78. OPT2=-j87# -O
  79. # The hashfile is a record of positions seen. It is used by
  80. # GNU Chess to avoid making the same mistakes, a form of learning.
  81. #HASH=    -dHASHFILE="$(LIBDIR)gnuchess.hash"
  82. HASH=
  83.  
  84. # The "book" is a record of the first few moves, for playing good
  85. # moves easily and quickly, saving time, and irritating the human
  86. # opponent.
  87. #BOOK=    -dBOOK="$(LIBDIR)gnuchess.book"
  88. BOOK=
  89. #BINBOOK = -dBINBOOK="$(LIBDIR)/gnuchess.book.data"
  90.  
  91. # The language file describes capabilities of the program. Perhaps
  92. # it is useful for non-English speaking countries and customizing
  93. # for their convenience and chess happiness.
  94. #LANG= -dLANGFILE="$(LIBDIR)gnuchess.lang"
  95. LANG=
  96.  
  97. # The compiler used for compiling this software.
  98. # Use this for a plain C compiler 
  99. #CC= cc $(OPT)
  100. # Use this for DEC's ANSI C compiler on Ultrix
  101. #CC= c89 $(OPT)
  102. # Use this if you are lucky enough to have GNU CC.
  103. CC=    lc $(OPT)
  104. #CC=    /contrib/system/bin/gcc -W $(OPT)
  105.  
  106. # Miscellaneous CFLAGS. Uncomment the one you need and comment 
  107. # the other.
  108. #CFLAGS= -p -dinline=""     -traditional-cpp
  109. #CFLAGS= -O4 -Qpath .  # SunOS cc using unprotoize
  110. #CFLAGS= -O4 # Sun acc
  111. #CFLAGS= -g  # debug
  112. #CFLAGS= -O2
  113. #CFLAGS= +O3 -Aa -d_HPUX_SOURCE -dSYSV # HPUX cc 
  114. #CFLAGS= -O   -finline-functions -fstrength-reduce -d__mips -d__LANGUAGE_C # gnu cc 1.40 on DS5000
  115. #CFLAGS= -O   -finline-functions -fstrength-reduce  # gnu cc 1.40 on others
  116. #CFLAGS= -O2 -funroll-loops -d__mips -d__LANGUAGE_C # gnu cc 2.00 on DS5000
  117. #CFLAGS= -O2 -funroll-loops -traditional-cpp  # gnu cc  2.00 on SunOS
  118. #CFLAGS= -O2 -funroll-loops  # gnu cc  2.00 on others
  119. CFLAGS=-Hdefines.sym -j88 -cs
  120. #CURSES=curses.lib
  121. CURSES=curse.o
  122.  
  123. AMIOBJS=amiga/amiterm.o amiga/beep.o amiga/amidsp.o amiga/display.o amiga/draw.o \
  124.     amiga/pieces.o amiga/pointer.o amiga/requester.o
  125.  
  126. ami: defines.sym gnuchessa
  127.  
  128. defines.sym: defines.c gnuchess.h
  129.     $(CC) -ph -odefines.sym defines.c
  130.  
  131. all : gnuchess gnuchessr gnuchessn gnuchessx gnuchessc postprint gnuan game checkbook checkgame
  132.  
  133. gnuchessa: mainN.o bookN.o genmovesN.o ataks.o util.o evalN.o init.o searchN.o dspcomN.o $(AMIOBJS) tmp.lnk
  134.     blink with tmp.lnk
  135.  
  136. tmp.lnk: makefile
  137.      echo "Remaking link file..."
  138.     @echo >tmp.lnk "FROM lib:c.o"
  139.     @echo >>tmp.lnk "mainN.o bookN.o genmovesN.o ataks.o util.o evalN.o init.o searchN.o dspcomN.o"
  140.     @echo >>tmp.lnk $(AMIOBJS)
  141.     @echo >>tmp.lnk "TO gnuchessa"
  142.     @echo >>tmp.lnk "LIBRARY "
  143.     @echo >>tmp.lnk "lib:umain2.o lib:reqtools.lib lib:lc.lib lib:amiga.lib"
  144.     @echo >>tmp.lnk "SC ND VERBOSE"
  145.  
  146. gnuchess: mainN.o bookN.o genmovesN.o ataks.o util.o evalN.o init.o searchN.o dspcomN.o uxdsp.o
  147.     blink from lib:c.o  mainN.o bookN.o genmovesN.o ataks.o util.o evalN.o init.o searchN.o dspcomN.o uxdsp.o\
  148.     to gnuchess lib curses32.lib lib:lcnb.lib lib:amiga.lib sc nd
  149.  
  150. gnuchessn: mainN.o bookN.o genmovesN.o ataks.o util.o evalN.o init.o searchN.o dspcomN.o nuxdsp.o
  151.     blink from lib:c.o mainN.o bookN.o genmovesN.o ataks.o util.o evalN.o init.o searchN.o dspcomN.o nuxdsp.o\
  152.     to gnuchessn lib $(CURSES) lib:umain2.o lib:lc.lib lib:amiga.lib sc nd
  153.     
  154. gnuan: mainN.o bookN.o genmovesN.o ataks.o util.o evalN.o init.o searchN.o gnuan.o
  155.     $(CC) $(CFLAGS) $(HASH) $(LANG) $(BOOK) -o gnuan mainN.o bookN.o genmovesN.o ataks.o util.o evalN.o init.o searchN.o gnuan.o
  156.  
  157. game: game.c gnuchess.h
  158.     $(CC) $(CFLAGS) -o game game.c
  159.     
  160. postprint: postprint.o
  161.     $(CC) $(CFLAGS) -o postprint postprint.o
  162.     
  163. checkbook: checkbook.o
  164.     $(CC) $(CFLAGS) -o checkbook checkbook.o
  165.     
  166. checkgame: checkgame.o
  167.     $(CC) $(CFLAGS) -o checkgame checkgame.o
  168.  
  169. gnuan.o: gnuan.c gnuchess.h version.h
  170.     $(CC) $(CFLAGS) $(HASH) $(LANG) $(BOOK) gnuan.c
  171.  
  172. mainN.o: main.c gnuchess.h version.h
  173.     $(CC) $(CFLAGS) $(HASH) $(LANG) $(BOOK) main.c
  174.     -delete mainN.o
  175.     rename main.o mainN.o
  176.  
  177. genmovesN.o: genmoves.c gnuchess.h version.h
  178.     $(CC) $(CFLAGS) $(HASH) $(LANG) $(BOOK)  genmoves.c
  179.     -delete genmovesN.o
  180.     rename genmoves.o genmovesN.o
  181.  
  182. bookN.o: book.c gnuchess.h version.h
  183.     $(CC) $(CFLAGS) $(HASH) $(LANG) $(BOOK) $(BINBOOK)  book.c 
  184.     -delete bookN.o
  185.     rename book.o bookN.o
  186.  
  187. ataks.o: ataks.h ataks.c gnuchess.h version.h
  188.     $(CC) $(CFLAGS) $(HASH) $(LANG) $(BOOK)  ataks.c
  189.  
  190. util.o: util.c gnuchess.h version.h
  191.     $(CC) $(CFLAGS) $(HASH) $(LANG) $(BOOK)  util.c
  192.  
  193. evalN.o: eval.c gnuchess.h version.h
  194.     $(CC) $(CFLAGS) $(HASH) $(LANG) $(BOOK)  eval.c
  195.     -delete evalN.o
  196.     rename eval.o evalN.o
  197.  
  198. init.o: init.c gnuchess.h version.h
  199.     $(CC) $(CFLAGS) $(HASH) $(LANG) $(BOOK)  init.c
  200.  
  201. searchN.o: search.c gnuchess.h version.h
  202.     $(CC) $(CFLAGS) $(HASH) $(LANG) $(BOOK)  search.c
  203.     -delete searchN.o
  204.     rename search.o searchN.o
  205.  
  206. nuxdsp.o: nuxdsp.c gnuchess.h version.h
  207.     $(CC) $(CFLAGS) $(OPT2) $(HASH) $(LANG) $(BOOK)  nuxdsp.c
  208.  
  209. dspcomN.o: dspcom.c gnuchess.h version.h
  210.     $(CC) $(CFLAGS) $(HASH) $(LANG) $(BOOK)  dspcom.c
  211.     -delete dspcomN.o
  212.     rename dspcom.o dspcomN.o
  213.  
  214. postprint.o: postprint.c gnuchess.h version.h
  215.     $(CC) $(CFLAGS)  postprint.c
  216.  
  217. AMIFLAGS=$(CFLAGS) -Hinclude:intui.sym
  218.  
  219. amiga/amiterm.o: amiga/amiterm.c
  220.     $(CC) $(AMIFLAGS) amiga/amiterm.c
  221.  
  222. amiga/beep.o: amiga/beep.c
  223.     $(CC) $(AMIFLAGS) amiga/beep.c
  224.  
  225. amiga/amidsp.o: amiga/amidsp.c
  226.     $(CC) $(AMIFLAGS) -j87 $(HASH) $(LANG) $(BOOK) amiga/amidsp.c
  227.  
  228. amiga/display.o: amiga/display.c
  229.     $(CC) $(AMIFLAGS) amiga/display.c
  230.  
  231. amiga/draw.o: amiga/draw.c amiga/draw.h
  232.     $(CC) $(AMIFLAGS) amiga/draw.c
  233.  
  234. amiga/pieces.o: amiga/pieces.c
  235.     $(CC) $(AMIFLAGS) amiga/pieces.c
  236.